class MinePointDetailListModel {
  List<MinePointDetailListItem>? list;
  int? pageNum;
  int? pageSize;
  int? total;
  int? totalPage;

  MinePointDetailListModel({
    this.list,
    this.pageNum,
    this.pageSize,
    this.total,
    this.totalPage,
  });

  MinePointDetailListModel.fromJson(Map<String, dynamic> json) {
    if (json["list"] is List) {
      list =
          json["list"] == null
              ? null
              : (json["list"] as List)
                  .map((e) => MinePointDetailListItem.fromJson(e))
                  .toList();
    }
    if (json["pageNum"] is num) {
      pageNum = (json["pageNum"] as num).toInt();
    }
    if (json["pageSize"] is num) {
      pageSize = (json["pageSize"] as num).toInt();
    }
    if (json["total"] is num) {
      total = (json["total"] as num).toInt();
    }
    if (json["totalPage"] is num) {
      totalPage = (json["totalPage"] as num).toInt();
    }
  }

  static List<MinePointDetailListModel> fromList(
    List<Map<String, dynamic>> list,
  ) {
    return list.map(MinePointDetailListModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if (list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    _data["pageNum"] = pageNum;
    _data["pageSize"] = pageSize;
    _data["total"] = total;
    _data["totalPage"] = totalPage;
    return _data;
  }
}

class MinePointDetailListItem {
  String? activityName;
  double? amount;
  String? activityType;
  String? pointsImageUrl;
  String? createTime;
  bool? isAdd;
  String? pointsType;
  String? remark;

  MinePointDetailListItem({
    this.activityName,
    this.amount,
    this.createTime,
    this.isAdd,
    this.pointsType,
    this.activityType,
    this.pointsImageUrl,
    this.remark,
  });

  MinePointDetailListItem.fromJson(Map<String, dynamic> json) {
    if (json["activityName"] is String) {
      activityName = json["activityName"];
    }
    if (json["amount"] is num) {
      amount = (json["amount"] as num).toDouble();
    }
    if (json["createTime"] is String) {
      createTime = json["createTime"];
    }
    if (json["isAdd"] is bool) {
      isAdd = json["isAdd"];
    }
    if (json["activityType"] is String) {
      activityType = json["activityType"];
    }
    if (json["pointsType"] is String) {
      pointsType = json["pointsType"];
    }
    if (json["pointsImageUrl"] is String) {
      pointsImageUrl = json["pointsImageUrl"];
    }
    if (json["remark"] is String) {
      remark = json["remark"];
    }
  }

  static List<MinePointDetailListItem> fromList(
    List<Map<String, dynamic>> list,
  ) {
    return list.map(MinePointDetailListItem.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["activityName"] = activityName;
    _data["amount"] = amount;
    _data["createTime"] = createTime;
    _data["isAdd"] = isAdd;
    _data["pointsType"] = pointsType;
    _data["pointsImageUrl"] = pointsImageUrl;
    _data["activityType"] = activityType;
    _data["remark"] = remark;
    return _data;
  }
}
